<template>
  <el-input
    v-model="searchName"
    class="!w-1/4 mr-6"
    :placeholder="prop.placeholder"
    clearable
    @keyup.enter="emit('searchInput')"
  />
  <el-button id="b1" type="primary" class="px-4 py-2 mr-3" @click="emit('searchInput')">
    查询
  </el-button>
  <el-button id="b2" type="info" class="px-4 py-2" @click="emit('claerInput')"> 重置 </el-button>
  <el-button id="b4" type="primary" class="px-4 py-2" @click="jumpHome()"> 返回 </el-button>
</template>
<script setup lang="ts">
import { useTable } from '@/composables/useTable'

const { jumpHome } = useTable()

//搜索框
const searchName = defineModel()
const prop = defineProps({
  placeholder: {
    type: String,
    required: true
  }
})

//按钮
const emit = defineEmits(['searchInput', 'claerInput'])
</script>

<style scoped>
#b4 {
  float: right;
}
</style>
